
#include "dtsmg.h"


u8 smg_dispaly[16]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,
0x7d,0x07,0x7f,0x6f,0x77,0x7c,0x39,0x5e,0x79,0x71};


void dtsmg(u8 i)
{
	if((i>15)&&(i<1))
   {
   		return;	
   }
	smg_inter=smg_dispaly[i];
}

void smg_piansel(u8 i)
{
   if((i>8)&&(i<1))
   {
   		return;	
   }
   switch(i-1)
   {
   		case 0:
		{
			hc138_HighC=0;hc138_MidB=0;hc138_LowA=0;break;	
		}
		case 1:
		{
			hc138_HighC=0;hc138_MidB=0;hc138_LowA=1;break;	
		}
		case 2:
		{
			hc138_HighC=0;hc138_MidB=1;hc138_LowA=0;break;	
		}
		case 3:
		{
			hc138_HighC=0;hc138_MidB=1;hc138_LowA=1;break;	
		}
		case 4:
		{
			hc138_HighC=1;hc138_MidB=0;hc138_LowA=0;break;	
		}
		case 5:
		{
			hc138_HighC=1;hc138_MidB=0;hc138_LowA=1;break;	
		}
		case 6:
		{
			hc138_HighC=1;hc138_MidB=1;hc138_LowA=0;break;	
		}
		case 7:
		{
			hc138_HighC=1;hc138_MidB=1;hc138_LowA=1;break;	
		}
   }
}